﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication2
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnOK_Click(object sender, EventArgs e) {
            if (txtUser.Text == "" || txtPwd.Text == "")
            {
                lblMessage.Text = "用户名或密码不能为空！";
            }
            else
            {
                if (txtUser.Text == "admin")
                {
                    Response.Write("<script>alert('不允许使用管理员账号！请重新注册账号信息！')</script>");
                    //
                }
                else
                {
                    string enUser = Server.UrlEncode(txtUser.Text);
                    Response.Redirect("index.aspx?user=" + Server.UrlEncode(enUser));
                }

            }
        }
    }
}